import React, { Component } from 'react';
// 引入当前组件的样式, 这种方式是最常用的
// import '../../assets/css/home.css';
// 引入home.js 样式文件
// 引入 axios
import axios from 'axios'
import {Title,Title1,Title3,Title4} from '../../assets/style/home'
class Home extends Component {
    render() {
        console.log(this);
        return (
            // <Title1>
                <div className='home' style={{fontSize:"30px"}}>
                    <Title>
                        <p>首页</p>
                    </Title>
                    <Title3>
                        <p>样式的继承</p>
                    </Title3>
                    <Title4 background='deeppink'>
                        <p>样式的传参</p>
                    </Title4>
                </div>
            // </Title1>
        );
    };
    componentDidMount(){
         axios.get('/api').then(res=>{
             console.log(res);
         })
    }
}

export default Home;
